import { uploadType } from '@/utils/util'

export const detailConfig: any = {
	label: '运营记录详情',
	inline: false,
	showBtn: false,
	labelPosition: 'left',
	labelWidth: '200px',
	column: [
		//-------------------- 员工花名册 ----------------

		{
			label: '姓名',
			prop: 'name',
			type: 'text',
			span: 12,
		},
		{
			label: '身份证号',
			prop: 'idCard',
			type: 'input',
			span: 12,
		},
		{
			label: '合同',
			prop: 'contract',
			type: 'upload',
			fileType: uploadType.fileMetaType,
			listType: 'text',
			showFileList: true,
			limit: 9,
			multiple: true,
			span: 12,
		},
		{
			label: '员工类型（职业类型）',
			prop: 'staffType',
			propName:'staffTypeLabel',
			type:'remoteSelect',
			api:'getDictItemList',
			code:'OCCUPATION_TYPE',
			span: 12,
		},
		{
			label: '资质证书',
			prop: 'qualificationCertificate',
			type: 'upload',
			fileType: uploadType.fileMetaType,
			listType: 'text',
			showFileList: true,
			limit: 9,
			multiple: true,
			span: 12,
		},
	],
}
const tableConfig = {
	stripe: true,
	border: true,
	maxHeight: '80vh',
	columns: [
		{
			label: '姓名',
			prop: 'name',
			type: 'text',
			span: 12,
		},
		{
			label: '身份证号',
			prop: 'idCard',
			type: 'input',
			span: 12,
		},
		{
			label: '合同',
			prop: 'contract',
			custome: 'file',
			span: 12,
		},
		{
			label: '员工类型（职业类型）',
			prop: 'staffType',
			propName:'staffTypeLabel',
			type:'remoteSelect',
			api:'getDictItemList',
			code:'OCCUPATION_TYPE',
			span: 12,
		},
		{
			label: '资质证书',
			prop: 'qualificationCertificate',
			custome: 'file',
			span: 12,
		},
	],
}
export const formConfig = {
	label: '员工花名册',
	prop: 'base0',
	inline: false,
	showBtn: true,
	labelPosition: 'left',
	column: detailConfig.column,
}
export const baseConfig: any = {
	pageName: '员工花名册',
	addLabel: '添加',
	dictcodes: ['OCCUPATION_TYPE'],
	rowKey: 'id',
	tipLabel: 'batch',
	api: {
		index: 'dpOrgBedSubsidyStaff_page',
		// edit: 'view_dpOperateRecord_edit',
		// delete: 'view_dpOperateRecord_del',
	},
	auth: {
		index: 'view_dpOrgBedSubsidyStaff_page',
		// edit: 'view_dpOperateRecord_edit',
		// delete: 'view_dpOperateRecord_del',
	},
	menuBtn: [
	],
	dialogConfig: {
		width: '65%',
	},
	tableConfig,
	formConfig,
	detailConfig,
}
